Package com.cisco.pt.ipc.sim
Interface PrivilegeManager
- All Known Implementing Classes:
PrivilegeManagerImpl
Information provided by the PKI file:
\class PrivilegeManager
\brief PrivilegeManager handles and manipulates privileges on routers and switches.
\example network().getDevice("Router0").getProcess("PrivilegeManager")
- Author:
- Auto-generated
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCommand(String mode, String command, boolean bAll, int level) Information provided by the PKI file:getCommandForMode(String mode, String command) Information provided by the PKI file:getCommandForModeAt(String mode, int index) Information provided by the PKI file:intgetCommandForModeCount(String mode) Information provided by the PKI file:getModeAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanisCommandAdded(String commandStr) Information provided by the PKI file:booleanremoveCommand(String mode, String command) Information provided by the PKI file:Methods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Method Details
-
addCommand
Information provided by the PKI file:
\brief Adds the specified command to the specified mode at the specified privilege level. \param mode, the mode to add the command to. Valid modes: user, enable, global. \param command, the command of interest. \param bAll, true to include all, false to not include all. \param level, the privilege level. \return bool, true if successful, otherwise false.- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of commandbAll- Takes in a parameter of bAlllevel- Takes in a parameter of level- Returns:
- boolean Returns a boolean
-
removeCommand
Information provided by the PKI file:
\brief Removes the specified command from the specified mode. \param mode, the mode to add the command to. Valid modes: user, enable, global. \param command, the command of interest. \return bool, true if successful, otherwise false.- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of command- Returns:
- boolean Returns a boolean
-
getModeCount
int getModeCount()Information provided by the PKI file:
\brief Returns the number of modes. \return int, the number of modes.- Returns:
- int Returns a int
-
getModeAt
Information provided by the PKI file:
\brief Returns the mode at the specified index. \param index, the index of the mode of interest. \return string, the mode at the specified index.- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
getCommandForModeCount
Information provided by the PKI file:
\brief Returns the number of commands for the specified mode. \param mode, the mode of interest. Valid modes: user, enable, global. \return int, the number of commands for the specified mode.- Parameters:
mode- Takes in a parameter of mode- Returns:
- int Returns a int
-
getCommandForModeAt
Information provided by the PKI file:
\brief Returns the command string and CommandPrivilege object in the specified mode at the specified index. \param mode, the mode of interest. Valid modes: user, enable, global. \param index, the index of the command of interest. \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.- Parameters:
mode- Takes in a parameter of modeindex- Takes in a parameter of index- Returns:
- Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
-
getCommandForMode
Information provided by the PKI file:
\brief Returns the command string and CommandPrivilege object in the specified mode for the specified command. \param mode, the mode of interest. Valid modes: user, enable, global. \param command, the command of interest. \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of command- Returns:
- Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
-
isCommandAdded
Information provided by the PKI file:
\brief Returns true if the command is already added, otherwise false. \param commandStr, command string to check for. \return bool, true if the command is already added, otherwise false.- Parameters:
commandStr- Takes in a parameter of commandStr- Returns:
- boolean Returns a boolean
-